package cn.iocoder.yudao.module.digital.util;

import cn.iocoder.yudao.module.digital.dal.dataobject.cardkeyorder.CardkeyOrderCardSecretDO;
import cn.iocoder.yudao.module.digital.service.cardchannel.model.common.CdkCardSecret;

public class CardKeyUtils {

    public static CdkCardSecret toCdkSecret(CardkeyOrderCardSecretDO v) {
        final CdkCardSecret card = new CdkCardSecret();
        card.setCardDetailData(v.getCardDetailData());

        card.setProductNo(v.getProductNo());
        card.setCurrencyCode(v.getCurrencyCode());
        card.setBuyDenomination(v.getBuyDenomination());

        card.setCardNumber(v.getCardNumber());
        card.setCode(v.getCode());
        card.setPin(v.getPin());
        card.setEGiftId(v.getEGiftId());
        return card;
    }

    public static CardkeyOrderCardSecretDO toCardkeyOrderCardDO(CdkCardSecret v) {
        final CardkeyOrderCardSecretDO card = new CardkeyOrderCardSecretDO();
        card.setCardDetailData(v.getCardDetailData());

        card.setProductNo(v.getProductNo());
        card.setCurrencyCode(v.getCurrencyCode());
        card.setBuyDenomination(v.getBuyDenomination());

        card.setCardNumber(v.getCardNumber());
        card.setCode(v.getCode());
        card.setPin(v.getPin());
        card.setEGiftId(v.getEGiftId());
        return card;
    }

}
